﻿// ////////////////////////////////////////////////////////////////////////////
// 
// SWE Case Tool
// 
// Solution:	CaseTool
// Project:		4. MethodCocomo
// Filename:	CocomoFactor.cs
// 
// File Created:	16:30 31.05.2013 
// Last Changed:	18:11 05.06.2013
// 
// ////////////////////////////////////////////////////////////////////////////

using System;

namespace SWE.CaseTool.Methods
{
	/// <summary>
	/// Describes a COCOMO Factor on which the cocomo calulation is based on.
	/// </summary>
	public class CocomoFactor : ICloneable
	{
		/// <summary>
		/// Gets or sets the factor's category.
		/// </summary>
		/// <value>
		/// The category.
		/// </value>
		public string Category { set; get; }

		/// <summary>
		/// Gets or sets the factor's name.
		/// </summary>
		/// <value>
		/// The name.
		/// </value>
		public string Name { set; get; }

		/// <summary>
		/// Gets or sets the the factor's weight.
		/// </summary>
		/// <value>
		/// The value.
		/// </value>
		public double Value { set; get; }

		/// <summary>
		/// Gets or sets the minimal weight.
		/// </summary>
		/// <value>
		/// The min.
		/// </value>
		public double Min { set; get; }

		/// <summary>
		/// Gets or sets the maximal weight.
		/// </summary>
		/// <value>
		/// The max.
		/// </value>
		public double Max { set; get; }

		/// <summary>
		/// Creates a new object that is a copy of the current instance.
		/// </summary>
		/// <returns>
		/// A new object that is a copy of this instance.
		/// </returns>
		public object Clone()
		{
			return new CocomoFactor
				{
					Category = (string) Category.Clone(),
					Name = (string) Name.Clone(),
					Value = Value,
					Min = Min,
					Max = Max
				};
		}
	}
}